home *** CD-ROM | disk | FTP | other *** search
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
You can browse this item here: maplay.lin
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
66%
| dexvert
| LIMIT Archive (archive/limit)
| ext
| Supported |
1%
| dexvert
| Electronic Arts interactive sequence (other/electronicArtsInteractiveSequence)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| Mailbox text, 1st line "From lpkruger@tucson.princeton.edu Sun Mar 13 15:20:22 EST 1994"
| default
| |
99%
| file
| unified diff output text, 1st line "From lpkruger@tucson.princeton.edu Sun Mar 13 15:20:22 EST 1994", 2nd line "Article: 1854 of comp.os.linux.announce", 3rd line "Newsgroups: comp.os.linux.announce", ASCII text
| default (weak)
| |
100%
| TrID
| E-Mail message (Var. 2)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| application/mbox
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 6c 70 6b | 72 75 67 65 72 40 74 75 |From lpk|ruger@tu|
|00000010| 63 73 6f 6e 2e 70 72 69 | 6e 63 65 74 6f 6e 2e 65 |cson.pri|nceton.e|
|00000020| 64 75 20 53 75 6e 20 4d | 61 72 20 31 33 20 31 35 |du Sun M|ar 13 15|
|00000030| 3a 32 30 3a 32 32 20 45 | 53 54 20 31 39 39 34 0a |:20:22 E|ST 1994.|
|00000040| 41 72 74 69 63 6c 65 3a | 20 31 38 35 34 20 6f 66 |Article:| 1854 of|
|00000050| 20 63 6f 6d 70 2e 6f 73 | 2e 6c 69 6e 75 78 2e 61 | comp.os|.linux.a|
|00000060| 6e 6e 6f 75 6e 63 65 0a | 4e 65 77 73 67 72 6f 75 |nnounce.|Newsgrou|
|00000070| 70 73 3a 20 63 6f 6d 70 | 2e 6f 73 2e 6c 69 6e 75 |ps: comp|.os.linu|
|00000080| 78 2e 61 6e 6e 6f 75 6e | 63 65 0a 50 61 74 68 3a |x.announ|ce.Path:|
|00000090| 20 62 69 67 62 6c 75 65 | 2e 6f 69 74 2e 75 6e 63 | bigblue|.oit.unc|
|000000a0| 2e 65 64 75 21 63 6f 6e | 63 65 72 74 21 63 6f 72 |.edu!con|cert!cor|
|000000b0| 70 67 61 74 65 21 6e 65 | 77 73 2e 75 74 64 61 6c |pgate!ne|ws.utdal|
|000000c0| 6c 61 73 2e 65 64 75 21 | 77 75 70 6f 73 74 21 6d |las.edu!|wupost!m|
|000000d0| 61 74 68 2e 6f 68 69 6f | 2d 73 74 61 74 65 2e 65 |ath.ohio|-state.e|
|000000e0| 64 75 21 63 79 62 65 72 | 32 2e 63 79 62 65 72 73 |du!cyber|2.cybers|
|000000f0| 74 6f 72 65 2e 63 61 21 | 6e 6e 74 70 2e 63 73 2e |tore.ca!|nntp.cs.|
|00000100| 75 62 63 2e 63 61 21 75 | 77 2d 62 65 61 76 65 72 |ubc.ca!u|w-beaver|
|00000110| 21 63 6f 72 6e 65 6c 6c | 21 62 6f 75 6e 63 65 2d |!cornell|!bounce-|
|00000120| 62 6f 75 6e 63 65 0a 46 | 72 6f 6d 3a 20 6c 70 6b |bounce.F|rom: lpk|
|00000130| 72 75 67 65 72 40 74 75 | 63 73 6f 6e 2e 70 72 69 |ruger@tu|cson.pri|
|00000140| 6e 63 65 74 6f 6e 2e 65 | 64 75 20 28 4c 6f 75 69 |nceton.e|du (Loui|
|00000150| 73 20 50 2e 20 4b 72 75 | 67 65 72 29 0a 53 75 62 |s P. Kru|ger).Sub|
|00000160| 6a 65 63 74 3a 20 6d 61 | 70 6c 61 79 20 6d 70 65 |ject: ma|play mpe|
|00000170| 67 20 61 75 64 69 6f 20 | 70 6c 61 79 65 72 20 66 |g audio |player f|
|00000180| 6f 72 20 4c 69 6e 75 78 | 0a 4d 65 73 73 61 67 65 |or Linux|.Message|
|00000190| 2d 49 44 3a 20 3c 31 39 | 39 34 4d 61 72 31 33 2e |-ID: <19|94Mar13.|
|000001a0| 31 37 35 31 35 37 2e 31 | 35 34 35 37 40 63 73 2e |175157.1|5457@cs.|
|000001b0| 63 6f 72 6e 65 6c 6c 2e | 65 64 75 3e 0a 46 6f 6c |cornell.|edu>.Fol|
|000001c0| 6c 6f 77 75 70 2d 54 6f | 3a 20 63 6f 6d 70 2e 6f |lowup-To|: comp.o|
|000001d0| 73 2e 6c 69 6e 75 78 2e | 6d 69 73 63 0a 4b 65 79 |s.linux.|misc.Key|
|000001e0| 77 6f 72 64 73 3a 20 6d | 70 65 67 2c 20 6d 61 70 |words: m|peg, map|
|000001f0| 6c 61 79 2c 20 73 6f 75 | 6e 64 0a 53 65 6e 64 65 |lay, sou|nd.Sende|
|00000200| 72 3a 20 6d 64 77 40 63 | 73 2e 63 6f 72 6e 65 6c |r: mdw@c|s.cornel|
|00000210| 6c 2e 65 64 75 20 28 4d | 61 74 74 20 57 65 6c 73 |l.edu (M|att Wels|
|00000220| 68 29 0a 52 65 70 6c 79 | 2d 54 6f 3a 20 6c 70 6b |h).Reply|-To: lpk|
|00000230| 72 75 67 65 72 40 74 75 | 63 73 6f 6e 2e 70 72 69 |ruger@tu|cson.pri|
|00000240| 6e 63 65 74 6f 6e 2e 65 | 64 75 20 28 4c 6f 75 69 |nceton.e|du (Loui|
|00000250| 73 20 50 2e 20 4b 72 75 | 67 65 72 29 0a 4f 72 67 |s P. Kru|ger).Org|
|00000260| 61 6e 69 7a 61 74 69 6f | 6e 3a 20 50 72 69 6e 63 |anizatio|n: Princ|
|00000270| 65 74 6f 6e 20 55 6e 69 | 76 65 72 73 69 74 79 0a |eton Uni|versity.|
|00000280| 44 61 74 65 3a 20 53 75 | 6e 2c 20 31 33 20 4d 61 |Date: Su|n, 13 Ma|
|00000290| 72 20 31 39 39 34 20 31 | 37 3a 35 31 3a 35 37 20 |r 1994 1|7:51:57 |
|000002a0| 47 4d 54 0a 41 70 70 72 | 6f 76 65 64 3a 20 6c 69 |GMT.Appr|oved: li|
|000002b0| 6e 75 78 2d 61 6e 6e 6f | 75 6e 63 65 40 74 63 2e |nux-anno|unce@tc.|
|000002c0| 63 6f 72 6e 65 6c 6c 2e | 65 64 75 20 28 4d 61 74 |cornell.|edu (Mat|
|000002d0| 74 20 57 65 6c 73 68 29 | 0a 4c 69 6e 65 73 3a 20 |t Welsh)|.Lines: |
|000002e0| 32 32 30 0a 0a 48 69 20 | 65 76 65 72 79 62 6f 64 |220..Hi |everybod|
|000002f0| 79 21 20 20 49 27 76 65 | 20 61 64 64 65 64 20 73 |y! I've| added s|
|00000300| 75 70 70 6f 72 74 20 66 | 6f 72 20 74 68 65 20 4c |upport f|or the L|
|00000310| 69 6e 75 78 20 73 6f 75 | 6e 64 20 64 72 69 76 65 |inux sou|nd drive|
|00000320| 72 20 74 6f 20 0a 54 6f | 62 69 61 73 20 42 61 64 |r to .To|bias Bad|
|00000330| 69 6e 67 27 73 20 76 65 | 72 79 20 66 69 6e 65 20 |ing's ve|ry fine |
|00000340| 70 72 6f 67 72 61 6d 20 | 6d 61 70 6c 61 79 2e 20 |program |maplay. |
|00000350| 20 54 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 70 72 | The ori|ginal pr|
|00000360| 6f 67 72 61 6d 0a 63 61 | 6e 20 62 65 20 66 6f 75 |ogram.ca|n be fou|
|00000370| 6e 64 20 6f 6e 20 73 75 | 6e 73 69 74 65 2e 75 6e |nd on su|nsite.un|
|00000380| 63 2e 65 64 75 20 69 6e | 20 2f 70 75 62 2f 65 6c |c.edu in| /pub/el|
|00000390| 65 63 74 72 6f 6e 69 63 | 2d 70 75 62 6c 69 63 61 |ectronic|-publica|
|000003a0| 74 69 6f 6e 73 2f 49 55 | 4d 41 0a 54 68 69 73 20 |tions/IU|MA.This |
|000003b0| 76 65 72 73 69 6f 6e 20 | 6f 6e 6c 79 20 73 75 70 |version |only sup|
|000003c0| 70 6f 72 74 73 20 6d 6f | 6e 6f 20 6f 75 74 70 75 |ports mo|no outpu|
|000003d0| 74 2c 20 74 68 65 72 65 | 20 77 6f 75 6c 64 6e 27 |t, there| wouldn'|
|000003e0| 74 20 62 65 20 74 6f 6f | 20 6d 75 63 68 0a 70 6f |t be too| much.po|
|000003f0| 69 6e 74 20 69 6e 20 69 | 6d 70 6c 65 6d 65 6e 74 |int in i|mplement|
|00000400| 69 6e 67 20 73 74 65 72 | 65 6f 2c 20 62 65 63 61 |ing ster|eo, beca|
|00000410| 75 73 65 20 74 68 65 20 | 70 6c 61 79 62 61 63 6b |use the |playback|
|00000420| 20 69 73 20 61 6c 72 65 | 61 64 79 20 61 20 6c 69 | is alre|ady a li|
|00000430| 74 74 6c 65 0a 63 68 6f | 70 70 79 20 61 73 20 69 |ttle.cho|ppy as i|
|00000440| 74 20 69 73 20 6f 6e 20 | 6d 79 20 34 38 36 2f 36 |t is on |my 486/6|
|00000450| 36 2e 20 20 50 65 6e 74 | 69 75 6d 20 6f 77 6e 65 |6. Pent|ium owne|
|00000460| 72 73 2c 20 65 6e 6a 6f | 79 21 20 0a 53 69 6e 63 |rs, enjo|y! .Sinc|
|00000470| 65 20 74 68 65 20 70 61 | 74 63 68 65 73 20 61 72 |e the pa|tches ar|
|00000480| 65 6e 27 74 20 74 6f 6f | 20 6c 6f 6e 67 2c 20 49 |en't too| long, I|
|00000490| 27 6d 20 69 6e 63 6c 75 | 64 69 6e 67 20 74 68 65 |'m inclu|ding the|
|000004a0| 6d 20 69 6e 20 74 68 69 | 73 20 6d 65 73 73 61 67 |m in thi|s messag|
|000004b0| 65 2e 0a 0a 09 4c 6f 75 | 69 73 0a 0a 2d 2d 2d 2d |e....Lou|is..----|
|000004c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004d0| 2d 2d 2d 2d 2d 2d 2d 2d | 43 55 54 20 48 45 52 45 |--------|CUT HERE|
|000004e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000500| 2d 2d 2d 2d 2d 2d 2d 0a | 2d 2d 2d 20 2e 2f 63 6f |-------.|--- ./co|
|00000510| 6e 66 69 67 75 72 61 74 | 69 6f 6e 2e 73 68 7e 09 |nfigurat|ion.sh~.|
|00000520| 4d 6f 6e 20 46 65 62 20 | 32 31 20 31 32 3a 32 39 |Mon Feb |21 12:29|
|00000530| 3a 34 38 20 31 39 39 34 | 0a 2b 2b 2b 20 2e 2f 63 |:48 1994|.+++ ./c|
|00000540| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 2e 73 68 09 |onfigura|tion.sh.|
|00000550| 53 61 74 20 4d 61 72 20 | 31 32 20 32 30 3a 34 34 |Sat Mar |12 20:44|
|00000560| 3a 33 39 20 31 39 39 34 | 0a 40 40 20 2d 34 36 2c |:39 1994|.@@ -46,|
|00000570| 39 20 2b 34 36 2c 31 35 | 20 40 40 0a 20 20 20 20 |9 +46,15| @@. |
|00000580| 20 20 49 4e 43 4c 55 44 | 45 44 49 52 53 3d 27 2d | INCLUD|EDIRS='-|
|00000590| 49 2f 75 73 72 2f 67 6e | 75 2f 6c 69 62 2f 67 2b |I/usr/gn|u/lib/g+|
|000005a0| 2b 2d 69 6e 63 6c 75 64 | 65 20 2d 49 2f 75 73 72 |+-includ|e -I/usr|
|000005b0| 2f 67 6e 75 2f 6c 69 62 | 2f 67 63 63 2d 6c 69 62 |/gnu/lib|/gcc-lib|
|000005c0| 2f 64 65 63 73 74 61 74 | 69 6f 6e 2f 32 2e 35 2e |/decstat|ion/2.5.|
|000005d0| 38 2f 69 6e 63 6c 75 64 | 65 27 0a 20 20 20 20 20 |8/includ|e'. |
|000005e0| 20 4c 49 42 52 41 52 49 | 45 53 3d 0a 20 20 20 20 | LIBRARI|ES=. |
|000005f0| 20 20 41 55 44 49 4f 5f | 49 4e 43 4c 55 44 45 53 | AUDIO_|INCLUDES|
|00000600| 3d 20 3b 3b 0a 2b 20 20 | 22 4c 69 6e 75 78 2a 22 |= ;;.+ |"Linux*"|
|00000610| 29 0a 2b 09 43 4f 4d 50 | 49 4c 45 52 3d 67 2b 2b |).+.COMP|ILER=g++|
|00000620| 0a 2b 09 43 4f 4d 50 49 | 4c 45 52 46 4c 41 47 53 |.+.COMPI|LERFLAGS|
|00000630| 3d 27 2d 4f 32 20 2d 6d | 34 38 36 20 2d 66 75 6e |='-O2 -m|486 -fun|
|00000640| 72 6f 6c 6c 2d 6c 6f 6f | 70 73 20 2d 57 61 6c 6c |roll-loo|ps -Wall|
|00000650| 20 2d 44 4c 49 4e 55 58 | 20 2d 44 44 41 4d 4e 5f | -DLINUX| -DDAMN_|
|00000660| 49 4e 54 45 4c 5f 42 59 | 54 45 5f 4f 52 44 45 52 |INTEL_BY|TE_ORDER|
|00000670| 27 0a 2b 09 49 4e 43 4c | 55 44 45 44 49 52 53 3d |'.+.INCL|UDEDIRS=|
|00000680| 27 2d 49 2f 75 73 72 2f | 67 2b 2b 2d 69 6e 63 6c |'-I/usr/|g++-incl|
|00000690| 75 64 65 2f 20 2d 49 2f | 75 73 72 2f 6c 69 62 2f |ude/ -I/|usr/lib/|
|000006a0| 67 63 63 2d 6c 69 62 2f | 69 34 38 36 2d 6c 69 6e |gcc-lib/|i486-lin|
|000006b0| 75 78 2f 32 2e 35 2e 38 | 2f 69 6e 63 6c 75 64 65 |ux/2.5.8|/include|
|000006c0| 2f 27 0a 2b 09 4c 49 42 | 52 41 52 49 45 53 3d 20 |/'.+.LIB|RARIES= |
|000006d0| 0a 2b 09 41 55 44 49 4f | 5f 49 4e 43 4c 55 44 45 |.+.AUDIO|_INCLUDE|
|000006e0| 53 3d 27 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |S='#incl|ude <sys|
|000006f0| 2f 73 6f 75 6e 64 63 61 | 72 64 2e 68 3e 27 20 3b |/soundca|rd.h>' ;|
|00000700| 3b 0a 20 20 20 2a 29 20 | 65 63 68 6f 20 22 54 68 |;. *) |echo "Th|
|00000710| 69 73 20 70 72 6f 67 72 | 61 6d 6d 20 68 61 73 20 |is progr|amm has |
|00000720| 6e 6f 74 20 62 65 65 6e | 20 74 65 73 74 65 64 20 |not been| tested |
|00000730| 6f 6e 20 79 6f 75 72 20 | 74 79 70 65 20 6f 66 20 |on your |type of |
|00000740| 6d 61 63 68 69 6e 65 20 | 79 65 74 21 22 0a 20 20 |machine |yet!". |
|00000750| 20 20 20 20 65 63 68 6f | 20 22 50 6c 65 61 73 65 | echo| "Please|
|00000760| 20 6d 6f 64 69 66 79 20 | 74 68 65 20 66 69 6c 65 | modify |the file|
|00000770| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 2e 73 | configu|ration.s|
|00000780| 68 20 61 63 63 6f 72 64 | 69 6e 67 20 74 6f 20 79 |h accord|ing to y|
|00000790| 6f 75 72 20 6e 65 65 64 | 73 21 22 0a 20 20 20 20 |our need|s!". |
|000007a0| 20 20 65 78 69 74 0a 20 | 65 73 61 63 0a 20 0a 20 | exit. |esac. . |
|000007b0| 65 78 70 6f 72 74 20 43 | 4f 4d 50 49 4c 45 52 20 |export C|OMPILER |
|000007c0| 43 4f 4d 50 49 4c 45 52 | 46 4c 41 47 53 20 49 4e |COMPILER|FLAGS IN|
|000007d0| 43 4c 55 44 45 44 49 52 | 53 20 4c 49 42 52 41 52 |CLUDEDIR|S LIBRAR|
|000007e0| 49 45 53 0a 2d 2d 2d 20 | 2e 2f 6d 61 70 6c 61 79 |IES.--- |./maplay|
|000007f0| 2e 63 7e 09 4d 6f 6e 20 | 46 65 62 20 32 31 20 31 |.c~.Mon |Feb 21 1|
|00000800| 32 3a 32 38 3a 31 38 20 | 31 39 39 34 0a 2b 2b 2b |2:28:18 |1994.+++|
|00000810| 20 2e 2f 6d 61 70 6c 61 | 79 2e 63 09 53 61 74 20 | ./mapla|y.c.Sat |
|00000820| 4d 61 72 20 31 32 20 31 | 39 3a 32 38 3a 32 35 20 |Mar 12 1|9:28:25 |
|00000830| 31 39 39 34 0a 40 40 20 | 2d 32 31 33 2c 31 37 20 |1994.@@ |-213,17 |
|00000840| 2b 32 31 33 2c 32 36 20 | 40 40 0a 20 20 20 20 20 |+213,26 |@@. |
|00000850| 20 20 45 78 69 74 20 28 | 31 29 3b 0a 20 20 20 20 | Exit (|1);. |
|00000860| 20 7d 0a 20 23 65 6c 73 | 65 0a 2d 2f 2f 20 23 69 | }. #els|e.-// #i|
|00000870| 66 64 65 66 20 79 6f 75 | 72 5f 6d 61 63 68 69 6e |fdef you|r_machin|
|00000880| 65 0a 2d 2f 2f 20 20 20 | 20 69 66 20 28 6d 6f 64 |e.-// | if (mod|
|00000890| 65 20 3d 3d 20 73 69 6e | 67 6c 65 5f 63 68 61 6e |e == sin|gle_chan|
|000008a0| 6e 65 6c 20 7c 7c 20 77 | 68 69 63 68 5f 63 68 61 |nel || w|hich_cha|
|000008b0| 6e 6e 65 6c 73 20 21 3d | 20 62 6f 74 68 29 0a 2d |nnels !=| both).-|
|000008c0| 2f 2f 20 20 20 20 20 20 | 62 75 66 66 65 72 20 3d |// |buffer =|
|000008d0| 20 6e 65 77 20 79 6f 75 | 72 5f 4f 62 75 66 66 65 | new you|r_Obuffe|
|000008e0| 72 20 28 79 6f 75 72 5f | 70 61 72 61 6d 65 74 65 |r (your_|paramete|
|000008f0| 72 73 29 3b 09 2f 2f 20 | 6d 6f 6e 6f 0a 2d 2f 2f |rs);.// |mono.-//|
|00000900| 20 20 20 20 65 6c 73 65 | 0a 2d 2f 2f 20 20 20 20 | else|.-// |
|00000910| 20 20 62 75 66 66 65 72 | 20 3d 20 6e 65 77 20 79 | buffer| = new y|
|00000920| 6f 75 72 5f 4f 62 75 66 | 66 65 72 20 28 79 6f 75 |our_Obuf|fer (you|
|00000930| 72 5f 70 61 72 61 6d 65 | 74 65 72 73 29 3b 09 2f |r_parame|ters);./|
|00000940| 2f 20 73 74 65 72 65 6f | 0a 2d 2f 2f 20 23 65 6c |/ stereo|.-// #el|
|00000950| 73 65 0a 2b 23 69 66 64 | 65 66 20 4c 49 4e 55 58 |se.+#ifd|ef LINUX|
|00000960| 0a 2b 20 20 69 66 20 28 | 4c 69 6e 75 78 4f 62 75 |.+ if (|LinuxObu|
|00000970| 66 66 65 72 3a 3a 63 6c | 61 73 73 5f 73 75 69 74 |ffer::cl|ass_suit|
|00000980| 61 62 6c 65 28 0a 2b 20 | 20 20 20 20 20 20 28 6d |able(.+ | (m|
|00000990| 6f 64 65 20 3d 3d 20 73 | 69 6e 67 6c 65 5f 63 68 |ode == s|ingle_ch|
|000009a0| 61 6e 6e 65 6c 20 7c 7c | 20 77 68 69 63 68 5f 63 |annel ||| which_c|
|000009b0| 68 61 6e 6e 65 6c 73 20 | 21 3d 20 62 6f 74 68 29 |hannels |!= both)|
|000009c0| 20 3f 20 31 20 3a 20 32 | 20 29 29 0a 2b 20 20 7b | ? 1 : 2| )).+ {|
|000009d0| 20 0a 2b 20 20 20 20 69 | 66 28 6d 6f 64 65 20 3d | .+ i|f(mode =|
|000009e0| 3d 20 73 69 6e 67 6c 65 | 5f 63 68 61 6e 6e 65 6c |= single|_channel|
|000009f0| 20 7c 7c 20 77 68 69 63 | 68 5f 63 68 61 6e 6e 65 | || whic|h_channe|
|00000a00| 6c 73 20 21 3d 20 62 6f | 74 68 29 0a 2b 20 20 20 |ls != bo|th).+ |
|00000a10| 20 20 20 62 75 66 66 65 | 72 20 3d 20 6e 65 77 20 | buffe|r = new |
|00000a20| 4c 69 6e 75 78 4f 62 75 | 66 66 65 72 20 28 31 2c |LinuxObu|ffer (1,|
|00000a30| 20 68 65 61 64 65 72 29 | 3b 0a 2b 20 20 20 20 65 | header)|;.+ e|
|00000a40| 6c 73 65 0a 2b 20 20 20 | 20 20 20 62 75 66 66 65 |lse.+ | buffe|
|00000a50| 72 20 3d 20 6e 65 77 20 | 4c 69 6e 75 78 4f 62 75 |r = new |LinuxObu|
|00000a60| 66 66 65 72 20 28 32 2c | 20 68 65 61 64 65 72 29 |ffer (2,| header)|
|00000a70| 3b 0a 2b 20 20 7d 0a 2b | 20 20 65 6c 73 65 0a 2b |;.+ }.+| else.+|
|00000a80| 20 20 7b 0a 2b 20 20 20 | 20 63 65 72 72 20 3c 3c | {.+ | cerr <<|
|00000a90| 20 22 53 6f 72 72 79 2c | 20 6e 6f 20 73 75 69 74 | "Sorry,| no suit|
|00000aa0| 61 62 6c 65 20 61 75 64 | 69 6f 20 64 65 76 69 63 |able aud|io devic|
|00000ab0| 65 20 64 65 74 65 63 74 | 65 64 2c 20 70 6c 65 61 |e detect|ed, plea|
|00000ac0| 73 65 20 75 73 65 20 73 | 74 64 6f 75 74 20 6d 6f |se use s|tdout mo|
|00000ad0| 64 65 2e 5c 6e 22 3b 0a | 2b 20 20 20 20 45 78 69 |de.\n";.|+ Exi|
|00000ae0| 74 28 31 29 3b 0a 2b 20 | 20 7d 0a 2b 23 65 6c 73 |t(1);.+ | }.+#els|
|00000af0| 65 0a 20 20 20 7b 0a 20 | 20 20 20 20 63 65 72 72 |e. {. | cerr|
|00000b00| 20 3c 3c 20 22 53 6f 72 | 72 79 2c 20 6e 6f 20 73 | << "Sor|ry, no s|
|00000b10| 75 69 74 61 62 6c 65 20 | 61 75 64 69 6f 20 64 65 |uitable |audio de|
|00000b20| 76 69 63 65 20 64 65 74 | 65 63 74 65 64 2c 20 70 |vice det|ected, p|
|00000b30| 6c 65 61 73 65 20 75 73 | 65 20 73 74 64 6f 75 74 |lease us|e stdout|
|00000b40| 20 6d 6f 64 65 2e 5c 6e | 22 3b 0a 20 20 20 20 20 | mode.\n|";. |
|00000b50| 45 78 69 74 20 28 31 29 | 3b 0a 20 20 20 7d 0a 2d |Exit (1)|;. }.-|
|00000b60| 2f 2f 20 23 65 6e 64 69 | 66 20 20 2f 2f 20 21 79 |// #endi|f // !y|
|00000b70| 6f 75 72 5f 6d 61 63 68 | 69 6e 65 0a 2b 23 65 6e |our_mach|ine.+#en|
|00000b80| 64 69 66 20 20 2f 2f 20 | 21 4c 49 4e 55 58 0a 20 |dif // |!LINUX. |
|00000b90| 23 65 6e 64 69 66 09 2f | 2f 20 21 53 50 41 52 43 |#endif./|/ !SPARC|
|00000ba0| 0a 20 23 65 6e 64 69 66 | 09 2f 2f 20 21 49 6e 64 |. #endif|.// !Ind|
|00000bb0| 69 67 6f 0a 20 0a 2d 2d | 2d 20 2e 2f 6f 62 75 66 |igo. .--|- ./obuf|
|00000bc0| 66 65 72 2e 63 7e 09 4d | 6f 6e 20 46 65 62 20 32 |fer.c~.M|on Feb 2|
|00000bd0| 31 20 31 32 3a 32 38 3a | 32 31 20 31 39 39 34 0a |1 12:28:|21 1994.|
|00000be0| 2b 2b 2b 20 2e 2f 6f 62 | 75 66 66 65 72 2e 63 09 |+++ ./ob|uffer.c.|
|00000bf0| 53 61 74 20 4d 61 72 20 | 31 32 20 31 39 3a 34 32 |Sat Mar |12 19:42|
|00000c00| 3a 34 33 20 31 39 39 34 | 0a 40 40 20 2d 37 35 2c |:43 1994|.@@ -75,|
|00000c10| 37 20 2b 37 35 2c 31 32 | 32 20 40 40 0a 20 20 20 |7 +75,12|2 @@. |
|00000c20| 20 20 62 75 66 66 65 72 | 70 5b 69 5d 20 3d 20 62 | buffer|p[i] = b|
|00000c30| 75 66 66 65 72 20 2b 20 | 69 3b 0a 20 7d 0a 20 0a |uffer + |i;. }. .|
|00000c40| 2b 23 69 66 64 65 66 20 | 4c 49 4e 55 58 0a 20 0a |+#ifdef |LINUX. .|
|00000c50| 2b 69 6e 74 20 4c 69 6e | 75 78 4f 62 75 66 66 65 |+int Lin|uxObuffe|
|00000c60| 72 3a 3a 61 75 64 69 6f | 5f 66 64 20 3d 20 2d 31 |r::audio|_fd = -1|
|00000c70| 3b 0a 2b 0a 2b 69 6e 74 | 20 4c 69 6e 75 78 4f 62 |;.+.+int| LinuxOb|
|00000c80| 75 66 66 65 72 3a 3a 6f | 70 65 6e 5f 61 75 64 69 |uffer::o|pen_audi|
|00000c90| 6f 5f 64 65 76 69 63 65 | 20 28 76 6f 69 64 29 0a |o_device| (void).|
|00000ca0| 2b 7b 0a 2b 20 20 69 6e | 74 20 66 64 3b 0a 2b 0a |+{.+ in|t fd;.+.|
|00000cb0| 2b 20 20 69 66 20 28 28 | 66 64 20 3d 20 6f 70 65 |+ if ((|fd = ope|
|00000cc0| 6e 20 28 22 2f 64 65 76 | 2f 64 73 70 22 2c 20 4f |n ("/dev|/dsp", O|
|00000cd0| 5f 57 52 4f 4e 4c 59 20 | 7c 20 4f 5f 4e 44 45 4c |_WRONLY || O_NDEL|
|00000ce0| 41 59 2c 20 30 29 29 20 | 3c 20 30 29 0a 2b 20 20 |AY, 0)) |< 0).+ |
|00000cf0| 20 20 69 66 20 28 65 72 | 72 6e 6f 20 3d 3d 20 45 | if (er|rno == E|
|00000d00| 42 55 53 59 29 0a 2b 20 | 20 20 20 7b 0a 2b 20 20 |BUSY).+ | {.+ |
|00000d10| 20 20 20 20 63 65 72 72 | 20 3c 3c 20 22 53 6f 72 | cerr| << "Sor|
|00000d20| 72 79 2c 20 74 68 65 20 | 61 75 64 69 6f 20 64 65 |ry, the |audio de|
|00000d30| 76 69 63 65 20 69 73 20 | 62 75 73 79 21 5c 6e 22 |vice is |busy!\n"|
|00000d40| 3b 0a 2b 20 20 20 20 20 | 20 65 78 69 74 20 28 31 |;.+ | exit (1|
|00000d50| 29 3b 0a 2b 20 20 20 20 | 7d 0a 2b 20 20 20 20 65 |);.+ |}.+ e|
|00000d60| 6c 73 65 0a 2b 20 20 20 | 20 7b 0a 2b 20 20 20 20 |lse.+ | {.+ |
|00000d70| 20 20 70 65 72 72 6f 72 | 20 28 22 63 61 6e 27 74 | perror| ("can't|
|00000d80| 20 6f 70 65 6e 20 2f 64 | 65 76 2f 64 73 70 20 66 | open /d|ev/dsp f|
|00000d90| 6f 72 20 77 72 69 74 69 | 6e 67 22 29 3b 0a 2b 20 |or writi|ng");.+ |
|00000da0| 20 20 20 20 20 65 78 69 | 74 20 28 31 29 3b 0a 2b | exi|t (1);.+|
|00000db0| 20 20 20 20 7d 0a 2b 20 | 20 72 65 74 75 72 6e 20 | }.+ | return |
|00000dc0| 66 64 3b 0a 2b 7d 0a 2b | 0a 2b 4c 69 6e 75 78 4f |fd;.+}.+|.+LinuxO|
|00000dd0| 62 75 66 66 65 72 3a 3a | 4c 69 6e 75 78 4f 62 75 |buffer::|LinuxObu|
|00000de0| 66 66 65 72 20 28 75 69 | 6e 74 33 32 20 6e 75 6d |ffer (ui|nt32 num|
|00000df0| 62 65 72 5f 6f 66 5f 63 | 68 61 6e 6e 65 6c 73 2c |ber_of_c|hannels,|
|00000e00| 20 48 65 61 64 65 72 20 | 2a 68 65 61 64 65 72 29 | Header |*header)|
|00000e10| 0a 2b 7b 0a 2b 23 69 66 | 64 65 66 20 44 45 42 55 |.+{.+#if|def DEBU|
|00000e20| 47 0a 2b 20 20 69 66 20 | 28 21 6e 75 6d 62 65 72 |G.+ if |(!number|
|00000e30| 5f 6f 66 5f 63 68 61 6e | 6e 65 6c 73 20 7c 7c 20 |_of_chan|nels || |
|00000e40| 6e 75 6d 62 65 72 5f 6f | 66 5f 63 68 61 6e 6e 65 |number_o|f_channe|
|00000e50| 6c 73 20 3e 20 4d 41 58 | 43 48 41 4e 4e 45 4c 53 |ls > MAX|CHANNELS|
|00000e60| 29 0a 2b 20 20 7b 0a 2b | 20 20 20 20 63 65 72 72 |).+ {.+| cerr|
|00000e70| 20 3c 3c 20 22 4c 69 6e | 75 78 4f 62 75 66 66 65 | << "Lin|uxObuffe|
|00000e80| 72 3a 20 30 20 3c 20 6e | 75 6d 62 65 72 20 6f 66 |r: 0 < n|umber of|
|00000e90| 20 63 68 61 6e 6e 65 6c | 73 20 3c 20 22 20 3c 3c | channel|s < " <<|
|00000ea0| 20 4d 41 58 43 48 41 4e | 4e 45 4c 53 20 3c 3c 20 | MAXCHAN|NELS << |
|00000eb0| 22 21 5c 6e 22 3b 0a 2b | 20 20 20 20 65 78 69 74 |"!\n";.+| exit|
|00000ec0| 20 28 31 29 3b 0a 2b 20 | 20 7d 0a 2b 23 65 6e 64 | (1);.+ | }.+#end|
|00000ed0| 69 66 0a 2b 20 20 63 68 | 61 6e 6e 65 6c 73 20 3d |if.+ ch|annels =|
|00000ee0| 20 6e 75 6d 62 65 72 5f | 6f 66 5f 63 68 61 6e 6e | number_|of_chann|
|00000ef0| 65 6c 73 3b 0a 2b 20 20 | 66 6f 72 20 28 69 6e 74 |els;.+ |for (int|
|00000f00| 20 69 20 3d 20 30 3b 20 | 69 20 3c 20 6e 75 6d 62 | i = 0; |i < numb|
|00000f10| 65 72 5f 6f 66 5f 63 68 | 61 6e 6e 65 6c 73 3b 20 |er_of_ch|annels; |
|00000f20| 2b 2b 69 29 0a 2b 20 20 | 20 20 62 75 66 66 65 72 |++i).+ | buffer|
|00000f30| 70 5b 69 5d 20 3d 20 62 | 75 66 66 65 72 20 2b 20 |p[i] = b|uffer + |
|00000f40| 69 3b 0a 2b 0a 2b 20 20 | 69 66 20 28 61 75 64 69 |i;.+.+ |if (audi|
|00000f50| 6f 5f 66 64 20 3c 20 30 | 29 0a 2b 20 20 7b 0a 2b |o_fd < 0|).+ {.+|
|00000f60| 20 20 20 20 63 65 72 72 | 20 3c 3c 20 22 49 6e 74 | cerr| << "Int|
|00000f70| 65 72 6e 61 6c 20 65 72 | 72 6f 72 2c 20 4c 69 6e |ernal er|ror, Lin|
|00000f80| 75 78 4f 62 75 66 66 65 | 72 3a 3a 61 75 64 69 6f |uxObuffe|r::audio|
|00000f90| 5f 66 64 20 68 61 73 20 | 74 6f 20 62 65 20 69 6e |_fd has |to be in|
|00000fa0| 69 74 69 61 6c 69 7a 65 | 64 5c 6e 22 0a 2b 09 20 |itialize|d\n".+. |
|00000fb0| 20 20 20 22 62 79 20 4c | 69 6e 75 78 4f 62 75 66 | "by L|inuxObuf|
|00000fc0| 66 65 72 3a 3a 63 6c 61 | 73 73 5f 73 75 69 74 61 |fer::cla|ss_suita|
|00000fd0| 62 6c 65 28 29 21 5c 6e | 22 3b 0a 2b 20 20 20 20 |ble()!\n|";.+ |
|00000fe0| 65 78 69 74 20 28 31 29 | 3b 0a 2b 20 20 7d 0a 2b |exit (1)|;.+ }.+|
|00000ff0| 0a 2b 20 20 2f 2f 20 63 | 6f 6e 66 69 67 75 72 65 |.+ // c|onfigure|
|00001000| 20 74 68 65 20 64 65 76 | 69 63 65 3a 0a 2b 20 20 | the dev|ice:.+ |
|00001010| 69 6e 74 20 70 6c 61 79 | 5f 70 72 65 63 69 73 69 |int play|_precisi|
|00001020| 6f 6e 20 3d 20 31 36 3b | 0a 2b 20 20 69 6e 74 20 |on = 16;|.+ int |
|00001030| 70 6c 61 79 5f 73 74 65 | 72 65 6f 20 3d 20 63 68 |play_ste|reo = ch|
|00001040| 61 6e 6e 65 6c 73 2d 31 | 3b 0a 2b 20 20 69 6e 74 |annels-1|;.+ int|
|00001050| 20 70 6c 61 79 5f 73 61 | 6d 70 6c 65 5f 72 61 74 | play_sa|mple_rat|
|00001060| 65 20 3d 20 68 65 61 64 | 65 72 2d 3e 66 72 65 71 |e = head|er->freq|
|00001070| 75 65 6e 63 79 20 28 29 | 3b 0a 2b 0a 2b 20 20 69 |uency ()|;.+.+ i|
|00001080| 66 28 0a 2b 20 20 20 20 | 20 20 69 6f 63 74 6c 28 |f(.+ | ioctl(|
|00001090| 61 75 64 69 6f 5f 66 64 | 2c 20 53 4e 44 43 54 4c |audio_fd|, SNDCTL|
|000010a0| 5f 44 53 50 5f 53 41 4d | 50 4c 45 53 49 5a 45 2c |_DSP_SAM|PLESIZE,|
|000010b0| 20 26 70 6c 61 79 5f 70 | 72 65 63 69 73 69 6f 6e | &play_p|recision|
|000010c0| 29 20 3d 3d 20 2d 31 20 | 7c 7c 0a 2b 20 20 20 20 |) == -1 |||.+ |
|000010d0| 20 20 69 6f 63 74 6c 28 | 61 75 64 69 6f 5f 66 64 | ioctl(|audio_fd|
|000010e0| 2c 20 53 4e 44 43 54 4c | 5f 44 53 50 5f 53 54 45 |, SNDCTL|_DSP_STE|
|000010f0| 52 45 4f 2c 20 26 70 6c | 61 79 5f 73 74 65 72 65 |REO, &pl|ay_stere|
|00001100| 6f 29 20 3d 3d 20 2d 31 | 20 7c 7c 0a 2b 20 20 20 |o) == -1| ||.+ |
|00001110| 20 20 20 69 6f 63 74 6c | 28 61 75 64 69 6f 5f 66 | ioctl|(audio_f|
|00001120| 64 2c 20 53 4e 44 43 54 | 4c 5f 44 53 50 5f 53 50 |d, SNDCT|L_DSP_SP|
|00001130| 45 45 44 2c 20 26 70 6c | 61 79 5f 73 61 6d 70 6c |EED, &pl|ay_sampl|
|00001140| 65 5f 72 61 74 65 29 20 | 3d 3d 20 2d 31 0a 2b 20 |e_rate) |== -1.+ |
|00001150| 20 20 20 29 0a 2b 20 20 | 7b 0a 2b 20 20 20 20 70 | ).+ |{.+ p|
|00001160| 65 72 72 6f 72 20 28 22 | 63 6f 6e 66 69 67 75 72 |error ("|configur|
|00001170| 61 74 69 6f 6e 20 6f 66 | 20 2f 64 65 76 2f 64 73 |ation of| /dev/ds|
|00001180| 70 20 66 61 69 6c 65 64 | 22 29 3b 0a 2b 20 20 20 |p failed|");.+ |
|00001190| 20 65 78 69 74 20 28 31 | 29 3b 0a 2b 20 20 7d 0a | exit (1|);.+ }.|
|000011a0| 2b 7d 0a 2b 0a 2b 4c 69 | 6e 75 78 4f 62 75 66 66 |+}.+.+Li|nuxObuff|
|000011b0| 65 72 3a 3a 7e 4c 69 6e | 75 78 4f 62 75 66 66 65 |er::~Lin|uxObuffe|
|000011c0| 72 20 28 76 6f 69 64 29 | 0a 2b 7b 0a 2b 20 20 73 |r (void)|.+{.+ s|
|000011d0| 6c 65 65 70 20 28 31 29 | 3b 0a 2b 20 20 63 6c 6f |leep (1)|;.+ clo|
|000011e0| 73 65 20 28 61 75 64 69 | 6f 5f 66 64 29 3b 0a 2b |se (audi|o_fd);.+|
|000011f0| 7d 0a 2b 0a 2b 0a 2b 76 | 6f 69 64 20 4c 69 6e 75 |}.+.+.+v|oid Linu|
|00001200| 78 4f 62 75 66 66 65 72 | 3a 3a 61 70 70 65 6e 64 |xObuffer|::append|
|00001210| 20 28 75 69 6e 74 33 32 | 20 63 68 61 6e 6e 65 6c | (uint32| channel|
|00001220| 2c 20 69 6e 74 31 36 20 | 76 61 6c 75 65 29 0a 2b |, int16 |value).+|
|00001230| 7b 0a 2b 23 69 66 64 65 | 66 20 44 45 42 55 47 0a |{.+#ifde|f DEBUG.|
|00001240| 2b 20 20 69 66 20 28 63 | 68 61 6e 6e 65 6c 20 3e |+ if (c|hannel >|
|00001250| 3d 20 63 68 61 6e 6e 65 | 6c 73 29 0a 2b 20 20 7b |= channe|ls).+ {|
|00001260| 0a 2b 20 20 20 20 63 65 | 72 72 20 3c 3c 20 22 69 |.+ ce|rr << "i|
|00001270| 6c 6c 65 67 61 6c 20 63 | 68 61 6e 6e 65 6c 6e 75 |llegal c|hannelnu|
|00001280| 6d 62 65 72 20 69 6e 20 | 4c 69 6e 75 78 4f 62 75 |mber in |LinuxObu|
|00001290| 66 66 65 72 3a 3a 61 70 | 70 65 6e 64 28 29 21 5c |ffer::ap|pend()!\|
|000012a0| 6e 22 3b 0a 2b 20 20 20 | 20 65 78 69 74 20 28 31 |n";.+ | exit (1|
|000012b0| 29 3b 0a 2b 20 20 7d 0a | 2b 20 20 69 66 20 28 62 |);.+ }.|+ if (b|
|000012c0| 75 66 66 65 72 70 5b 63 | 68 61 6e 6e 65 6c 5d 20 |ufferp[c|hannel] |
|000012d0| 2d 20 62 75 66 66 65 72 | 20 3e 3d 20 4f 42 55 46 |- buffer| >= OBUF|
|000012e0| 46 45 52 53 49 5a 45 29 | 0a 2b 20 20 7b 0a 2b 20 |FERSIZE)|.+ {.+ |
|000012f0| 20 20 20 63 65 72 72 20 | 3c 3c 20 22 62 75 66 66 | cerr |<< "buff|
|00001300| 65 72 20 6f 76 65 72 66 | 6c 6f 77 21 5c 6e 22 3b |er overf|low!\n";|
|00001310| 0a 2b 20 20 20 20 65 78 | 69 74 20 28 31 29 3b 0a |.+ ex|it (1);.|
|00001320| 2b 20 20 7d 0a 2b 23 65 | 6e 64 69 66 0a 2b 20 20 |+ }.+#e|ndif.+ |
|00001330| 2a 62 75 66 66 65 72 70 | 5b 63 68 61 6e 6e 65 6c |*bufferp|[channel|
|00001340| 5d 20 3d 20 76 61 6c 75 | 65 3b 0a 2b 20 20 62 75 |] = valu|e;.+ bu|
|00001350| 66 66 65 72 70 5b 63 68 | 61 6e 6e 65 6c 5d 20 2b |fferp[ch|annel] +|
|00001360| 3d 20 63 68 61 6e 6e 65 | 6c 73 3b 0a 2b 7d 0a 2b |= channe|ls;.+}.+|
|00001370| 0a 2b 0a 2b 76 6f 69 64 | 20 4c 69 6e 75 78 4f 62 |.+.+void| LinuxOb|
|00001380| 75 66 66 65 72 3a 3a 77 | 72 69 74 65 5f 62 75 66 |uffer::w|rite_buf|
|00001390| 66 65 72 20 28 69 6e 74 | 29 0a 2b 7b 0a 2b 20 20 |fer (int|).+{.+ |
|000013a0| 69 6e 74 20 6c 65 6e 67 | 74 68 20 3d 20 28 69 6e |int leng|th = (in|
|000013b0| 74 29 28 28 63 68 61 72 | 20 2a 29 62 75 66 66 65 |t)((char| *)buffe|
|000013c0| 72 70 5b 30 5d 20 2d 20 | 28 63 68 61 72 20 2a 29 |rp[0] - |(char *)|
|000013d0| 62 75 66 66 65 72 29 3b | 0a 2b 20 20 69 66 20 28 |buffer);|.+ if (|
|000013e0| 77 72 69 74 65 20 28 61 | 75 64 69 6f 5f 66 64 2c |write (a|udio_fd,|
|000013f0| 20 62 75 66 66 65 72 2c | 20 6c 65 6e 67 74 68 29 | buffer,| length)|
|00001400| 20 21 3d 20 6c 65 6e 67 | 74 68 29 0a 2b 20 20 20 | != leng|th).+ |
|00001410| 20 63 65 72 72 20 3c 3c | 20 22 57 61 72 6e 69 6e | cerr <<| "Warnin|
|00001420| 67 3a 20 63 6f 75 6c 64 | 6e 27 74 20 77 72 69 74 |g: could|n't writ|
|00001430| 65 20 61 6c 6c 20 73 61 | 6d 70 6c 65 73 20 74 6f |e all sa|mples to|
|00001440| 20 2f 64 65 76 2f 64 73 | 70 5c 6e 22 3b 0a 2b 20 | /dev/ds|p\n";.+ |
|00001450| 20 66 6f 72 20 28 69 6e | 74 20 69 20 3d 20 30 3b | for (in|t i = 0;|
|00001460| 20 69 20 3c 20 63 68 61 | 6e 6e 65 6c 73 3b 20 2b | i < cha|nnels; +|
|00001470| 2b 69 29 0a 2b 20 20 20 | 20 62 75 66 66 65 72 70 |+i).+ | bufferp|
|00001480| 5b 69 5d 20 3d 20 62 75 | 66 66 65 72 20 2b 20 69 |[i] = bu|ffer + i|
|00001490| 3b 0a 2b 7d 0a 2b 0a 2b | 62 6f 6f 6c 20 4c 69 6e |;.+}.+.+|bool Lin|
|000014a0| 75 78 4f 62 75 66 66 65 | 72 3a 3a 63 6c 61 73 73 |uxObuffe|r::class|
|000014b0| 5f 73 75 69 74 61 62 6c | 65 20 28 69 6e 74 20 63 |_suitabl|e (int c|
|000014c0| 68 61 6e 6e 65 6c 73 29 | 0a 2b 7b 0a 2b 20 20 69 |hannels)|.+{.+ i|
|000014d0| 66 28 63 68 61 6e 6e 65 | 6c 73 20 21 3d 20 31 29 |f(channe|ls != 1)|
|000014e0| 0a 2b 20 20 7b 0a 2b 20 | 20 20 20 63 65 72 72 20 |.+ {.+ | cerr |
|000014f0| 3c 3c 20 22 53 74 65 72 | 65 6f 20 6f 75 74 70 75 |<< "Ster|eo outpu|
|00001500| 74 20 6e 6f 74 20 73 75 | 70 70 6f 72 74 65 64 2d |t not su|pported-|
|00001510| 2d 75 73 65 20 6d 6f 6e | 6f 20 6f 72 20 73 74 64 |-use mon|o or std|
|00001520| 6f 75 74 5c 6e 22 3b 0a | 2b 20 20 20 20 72 65 74 |out\n";.|+ ret|
|00001530| 75 72 6e 20 46 61 6c 73 | 65 3b 0a 2b 20 20 7d 0a |urn Fals|e;.+ }.|
|00001540| 2b 20 20 2f 2f 20 63 68 | 65 63 6b 20 66 6f 72 20 |+ // ch|eck for |
|00001550| 74 68 65 20 64 73 70 20 | 61 75 64 69 6f 20 64 65 |the dsp |audio de|
|00001560| 76 69 63 65 3a 0a 2b 20 | 20 61 75 64 69 6f 5f 66 |vice:.+ | audio_f|
|00001570| 64 20 3d 20 6f 70 65 6e | 5f 61 75 64 69 6f 5f 64 |d = open|_audio_d|
|00001580| 65 76 69 63 65 20 28 29 | 3b 0a 2b 23 69 66 64 65 |evice ()|;.+#ifde|
|00001590| 66 20 44 45 42 55 47 0a | 2b 20 20 69 66 20 28 61 |f DEBUG.|+ if (a|
|000015a0| 75 64 69 6f 5f 66 64 20 | 21 3d 20 2d 31 29 0a 2b |udio_fd |!= -1).+|
|000015b0| 20 20 20 20 63 65 72 72 | 20 3c 3c 20 22 4f 70 65 | cerr| << "Ope|
|000015c0| 6e 65 64 20 4f 6b 61 79 | 21 5c 6e 22 3b 0a 2b 20 |ned Okay|!\n";.+ |
|000015d0| 20 65 6c 73 65 0a 2b 20 | 20 20 20 63 65 72 72 20 | else.+ | cerr |
|000015e0| 3c 3c 20 22 45 72 72 6f | 72 3a 20 22 20 3c 3c 20 |<< "Erro|r: " << |
|000015f0| 65 72 72 6e 6f 20 3c 3c | 20 22 5c 6e 22 3b 0a 2b |errno <<| "\n";.+|
|00001600| 23 65 6e 64 69 66 0a 2b | 0a 2b 20 20 69 66 20 28 |#endif.+|.+ if (|
|00001610| 61 75 64 69 6f 5f 66 64 | 20 21 3d 20 2d 31 29 0a |audio_fd| != -1).|
|00001620| 2b 20 20 20 20 72 65 74 | 75 72 6e 20 54 72 75 65 |+ ret|urn True|
|00001630| 3b 0a 2b 20 20 65 6c 73 | 65 0a 2b 20 20 20 20 72 |;.+ els|e.+ r|
|00001640| 65 74 75 72 6e 20 46 61 | 6c 73 65 3b 0a 2b 7d 0a |eturn Fa|lse;.+}.|
|00001650| 2b 0a 2b 23 65 6e 64 69 | 66 09 2f 2a 20 4c 49 4e |+.+#endi|f./* LIN|
|00001660| 55 58 20 2a 2f 0a 20 0a | 20 23 69 66 64 65 66 20 |UX */. .| #ifdef |
|00001670| 49 6e 64 69 67 6f 0a 20 | 49 6e 64 69 67 6f 4f 62 |Indigo. |IndigoOb|
|00001680| 75 66 66 65 72 3a 3a 49 | 6e 64 69 67 6f 4f 62 75 |uffer::I|ndigoObu|
|00001690| 66 66 65 72 20 28 75 69 | 6e 74 33 32 20 6e 75 6d |ffer (ui|nt32 num|
|000016a0| 62 65 72 5f 6f 66 5f 63 | 68 61 6e 6e 65 6c 73 2c |ber_of_c|hannels,|
|000016b0| 20 48 65 61 64 65 72 20 | 2a 68 65 61 64 65 72 29 | Header |*header)|
|000016c0| 0a 2d 2d 2d 20 2e 2f 6f | 62 75 66 66 65 72 2e 68 |.--- ./o|buffer.h|
|000016d0| 7e 09 4d 6f 6e 20 46 65 | 62 20 32 31 20 31 32 3a |~.Mon Fe|b 21 12:|
|000016e0| 32 38 3a 32 31 20 31 39 | 39 34 0a 2b 2b 2b 20 2e |28:21 19|94.+++ .|
|000016f0| 2f 6f 62 75 66 66 65 72 | 2e 68 09 53 61 74 20 4d |/obuffer|.h.Sat M|
|00001700| 61 72 20 31 32 20 31 39 | 3a 31 32 3a 31 39 20 31 |ar 12 19|:12:19 1|
|00001710| 39 39 34 0a 40 40 20 2d | 36 31 2c 36 20 2b 36 31 |994.@@ -|61,6 +61|
|00001720| 2c 32 35 20 40 40 0a 20 | 20 20 76 6f 69 64 09 77 |,25 @@. | void.w|
|00001730| 72 69 74 65 5f 62 75 66 | 66 65 72 20 28 69 6e 74 |rite_buf|fer (int|
|00001740| 20 66 64 29 3b 0a 20 7d | 3b 0a 20 0a 2b 23 69 66 | fd);. }|;. .+#if|
|00001750| 64 65 66 20 4c 49 4e 55 | 58 0a 2b 63 6c 61 73 73 |def LINU|X.+class|
|00001760| 20 4c 69 6e 75 78 4f 62 | 75 66 66 65 72 20 3a 20 | LinuxOb|uffer : |
|00001770| 70 75 62 6c 69 63 20 4f | 62 75 66 66 65 72 0a 2b |public O|buffer.+|
|00001780| 7b 0a 2b 20 20 69 6e 74 | 31 36 20 62 75 66 66 65 |{.+ int|16 buffe|
|00001790| 72 5b 4f 42 55 46 46 45 | 52 53 49 5a 45 5d 3b 0a |r[OBUFFE|RSIZE];.|
|000017a0| 2b 20 20 69 6e 74 31 36 | 20 2a 62 75 66 66 65 72 |+ int16| *buffer|
|000017b0| 70 5b 4d 41 58 43 48 41 | 4e 4e 45 4c 53 5d 3b 0a |p[MAXCHA|NNELS];.|
|000017c0| 2b 20 20 75 69 6e 74 33 | 32 20 63 68 61 6e 6e 65 |+ uint3|2 channe|
|000017d0| 6c 73 3b 0a 2b 20 20 73 | 74 61 74 69 63 20 69 6e |ls;.+ s|tatic in|
|000017e0| 74 20 61 75 64 69 6f 5f | 66 64 3b 0a 2b 0a 2b 09 |t audio_|fd;.+.+.|
|000017f0| 73 74 61 74 69 63 20 69 | 6e 74 20 6f 70 65 6e 5f |static i|nt open_|
|00001800| 61 75 64 69 6f 5f 64 65 | 76 69 63 65 28 76 6f 69 |audio_de|vice(voi|
|00001810| 64 29 3b 0a 2b 0a 2b 20 | 20 70 75 62 6c 69 63 3a |d);.+.+ | public:|
|00001820| 0a 2b 09 4c 69 6e 75 78 | 4f 62 75 66 66 65 72 20 |.+.Linux|Obuffer |
|00001830| 28 75 69 6e 74 33 32 20 | 6e 75 6d 62 65 72 5f 6f |(uint32 |number_o|
|00001840| 66 5f 63 68 61 6e 6e 65 | 6c 73 2c 20 48 65 61 64 |f_channe|ls, Head|
|00001850| 65 72 20 2a 29 3b 0a 2b | 20 20 20 20 20 20 20 7e |er *);.+| ~|
|00001860| 4c 69 6e 75 78 4f 62 75 | 66 66 65 72 20 28 76 6f |LinuxObu|ffer (vo|
|00001870| 69 64 29 3b 0a 2b 20 20 | 76 6f 69 64 09 61 70 70 |id);.+ |void.app|
|00001880| 65 6e 64 20 28 75 69 6e | 74 33 32 20 63 68 61 6e |end (uin|t32 chan|
|00001890| 6e 65 6c 2c 20 69 6e 74 | 31 36 20 76 61 6c 75 65 |nel, int|16 value|
|000018a0| 29 3b 0a 2b 20 20 76 6f | 69 64 09 77 72 69 74 65 |);.+ vo|id.write|
|000018b0| 5f 62 75 66 66 65 72 20 | 28 69 6e 74 20 64 75 6d |_buffer |(int dum|
|000018c0| 6d 79 29 3b 0a 2b 09 73 | 74 61 74 69 63 20 62 6f |my);.+.s|tatic bo|
|000018d0| 6f 6c 20 63 6c 61 73 73 | 5f 73 75 69 74 61 62 6c |ol class|_suitabl|
|000018e0| 65 28 69 6e 74 29 3b 0a | 2b 0a 2b 7d 3b 0a 2b 23 |e(int);.|+.+};.+#|
|000018f0| 65 6e 64 69 66 0a 20 0a | 20 23 69 66 64 65 66 20 |endif. .| #ifdef |
|00001900| 49 6e 64 69 67 6f 0a 20 | 2f 2f 20 61 20 63 6c 61 |Indigo. |// a cla|
|00001910| 73 73 20 66 6f 72 20 64 | 69 72 65 63 74 20 73 6f |ss for d|irect so|
|00001920| 75 6e 64 20 6f 75 74 70 | 75 74 20 6f 6e 20 53 47 |und outp|ut on SG|
|00001930| 49 20 6d 61 63 68 69 6e | 65 73 3a 0a 2d 2d 2d 2d |I machin|es:.----|
|00001940| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001950| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 45 4e |--------|------EN|
|00001960| 44 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |D-------|--------|
|00001970| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001980| 2d 2d 2d 2d 0a 0a 0a 0a | |----....| |
+--------+-------------------------+-------------------------+--------+--------+